package net.huanger;


import landyer.tools.jdbcGenerator.App;
import landyer.tools.jdbcGenerator.TableWapper;
import org.junit.Test;

import java.io.IOException;
import java.sql.SQLException;
import java.util.Arrays;
import java.util.List;

/**
 * User: landy
 * Date: 14-1-20
 * Time: 下午7:44
 */
public class Generators {

    public void generatorCenter() throws SQLException, IOException, ClassNotFoundException {
        String packageName = "com.magusenv.eia.communication.eia.server.database";
        String root="/Volumes/mbak/magus/codes/eia-communication/src/main/java/";
        String configLocation = "applicationContext-center.xml";
        List<String> onlys = Arrays.asList("T_MID_ALARMLOG","T_MID_PSASINDIHOUR","T_MID_MODELCALRESHOUR","T_BASE_REPORTDATA");

        App.doWork(packageName, root, configLocation, null, onlys, "erc", TableWapper.ORACLE,false);
    }
    @Test
    public void generatorddz360test() throws SQLException, IOException, ClassNotFoundException {
        String packageName = "com.logs.gen";
        String root="E:\\workspace2\\DouDiZhu\\src\\main\\java\\";
        String configLocation = "applicationContext.xml";
        List<String> onlys = Arrays.asList("log_login","log_logout","log_money","log_online","log_round");

        App.doWork(packageName, root, configLocation, null, onlys,null, TableWapper.MYSQL,false);
    }
//    @Test
    public void generatorEnterprise() throws SQLException, IOException, ClassNotFoundException {
        String packageName = "com.magusenv.communication.eia.client.database";
        String root="/Volumes/mbak/magus/codes/magusenv-communication/eia-client/src/main/java/";
        String configLocation = "applicationContext-enterprise.xml";
        List<String> notContains = Arrays.asList("t_bas_report_data","t_mid_alarm_log","t_mid_model_calres_hour","t_mid_psas_indi_hour");

        App.doWork(packageName, root, configLocation,null, notContains,null, TableWapper.MYSQL,false);
    }
}
